The TEndpointInfo Structure
TheTEndpointInfo
structure, which is returned by theOTGetEndpointInfo
function, describes the initial characteristics of an endpoint that you opened by calling theOTOpenEndpoint
function or the A HREF=NetworkingWOT-150.html#MARKER-9-123>OTAsyncOpenEndpoint
function <. These functions initialize the suppliedTEndpointInfo
structure, if you have allocated space for one. You can also get a copy to theTEndpointInfo
structure by calling theOTGetEndpointInfo
function.You use the
TEndpointInfo
structure to find out how large a buffer you must allocate to send or receive information for the endpoint and what kind of services the endpoint provides.
The
- IMPORTANT
- It is recommended that you do not hard-code values into your application that you could otherwise get from the endpoint's
TEndpointInfo
field. These values might change.![]()
TEndpointInfo
structure is defined by theTEndpointInfo
data type.
struct TEndpointInfo { SInt32 addr; SInt32 options; SInt32 tsdu; SInt32 etsdu; SInt32 connect; SInt32 discon; UInt32 servtype; UInt32 flags; }; typedef struct TEndpointInfo TEndpointInfo;
Field Description
addr
- A value greater than or equal to 0 indicates the maximum size (in bytes) of a protocol address to which you can bind this endpoint. A value of
T_INVALID
indicates that this endpoint does not allow access to protocol addresses (e.g. serial communication). However, it does not account for protocols where the address is allowed to be a string, such as a DNS name for TCP/IP or an NBP name for AppleTalk. If you are using this feature, you have to be prepared to allow for a larger address size.options
- A value greater than or equal to 0 indicates the maximum number of bytes needed to store the protocol-specific options that this endpoint supports, if any. A value of
T_INVALID
(-2) indicates that this endpoint has no protocol-specific options that you can set; they are read-only. A value of -3 specifies that the provider does not support any options.tsdu
- For a transactionless endpoint, a positive value indicates the maximum number of bytes in a transport service data unit (TSDU) for this endpoint. A value of
T_INFINITE
(-1) indicates that there is no limit to the size of a TSDU. A value of 0 indicates that the provider does not support the concept of a TSDU. This means that you cannot send data with logical boundaries preserved across a connection. A value ofT_INVALID
indicates that this endpoint cannot transfer normal data (as opposed to expedited data).- For a transaction-based endpoint, this field indicates the maximum number of bytes in a response.
etsdu
- For a transactionless endpoint, a positive value indicates the maximum number of bytes in an expedited transport service data unit (ETSDU) for this endpoint. A value of
T_INFINITE
indicates that there is no limit to the size of a ETSDU. A value of 0 indicates that this endpoint does not support the concept of an ETSDU. This means that you must not send expedited data with logical boundaries preserved across a connection. A value ofT_INVALID
indicates that this endpoint cannot transfer expedited data.- For a transaction-based endpoint, this field indicates the maximum number of bytes in a request.
connect
- For a connection-oriented endpoint, a value greater than or equal to 0 indicates the maximum amount of data (in bytes) that you can send with the
OTConnect
function or theOTAccept
function. A value ofT_INVALID
indicates that this endpoint does not let you send data with these functions. This field is meaningless for other types of endpoints.discon
- For a connection-oriented endpoint, a value greater than or equal to 0 indicates the maximum amount of data (in bytes) that you can send using the
OTSndDisconnect
function. A value ofT_INVALID
indicates that this endpoint does not let you send data with disconnection requests. This field is meaningless for other types of endpoints.servtype
- A constant that indicates what kind of service the endpoint provides. Possible values are given by the endpoint service enumeration.
flags
- A bit field that provides additional information about the endpoint. Possible values are given by the endpoint flags enumeration.